<template>
    <div>
        <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
            <van-swipe-item v-for="item in bannerList">
                <van-image fit="cover" style="width: 100%; height: 210px;" :src="item.poster" />
            </van-swipe-item>

        </van-swipe>
    </div>


</template>

<script>
import { getBannerList } from '@/apis/shouye';
export default {
    data() {
        return {
            bannerList: [],
        }
    },
    created() {
        getBannerList().then(res => {
            // console.log(res);
            this.bannerList = res.data.data
            // console.log(res.data.data);

        })
    }
}
</script>

<style lang="less" scoped>
.my-swipe .van-swipe-item {
    color: #fff;
    font-size: 20px;
    line-height: 150px;
    text-align: center;
    background-color: #39a9ed;
}
.van-swipe.my-swipe{
    height: 210px;
}
</style>